#include <vector>
#include <iostream>
using namespace std;

int findMaxConsecutiveOnes(vector<int>& nums) {
    int max = 0, temp = 0;
    for(int i = 0; i < nums.size(); i++){
        nums[i] ? temp++ : temp = 0;
        if(temp > max){max = temp;}
    }
    return max;
}

int main(){
    vector<int> nums = { 1,1,1,1,0,1 }; 
    cout << findMaxConsecutiveOnes(nums) <<endl;
    return 0;
}